-- 科技项目管理生成新在研科技项目管理
CREATE
OR REPLACE PROCEDURE tbch_insert_tbjdfxpg(p_phid IN NUMBER) 
AS 

BEGIN
    INSERT INTO p_form_xzykjxmgl_m(
        phid,
        phid_org,
u_nd
u_ysze

        app_status,
        ng_insert_dt,
        ng_update_dt,
        ng_record_ver,
        wf_flag
    )
    SELECT
        seq_auto_phid_kjxmgl_xzykjxmgl.nextval,
        phid_org,
u_tbnd
u_ysfy

        0,
        TRUNC(SYSDATE),
        TRUNC(SYSDATE),
        2,
        0
    FROM p_form_zykjxmgl_m
    WHERE phid = p_phid;
    commit;
    EXCEPTION 
    WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('插入失败，错误信息：' || SQLERRM);
    RAISE;
    ROLLBACK;
END tbch_insert_tbjdfxpg;  